package util;

import javax.swing.*;
import java.awt.*;

public class DimensUtil {
    //设置chong满屏幕
    public static Rectangle getBounds(){
        Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
        Insets screenInsets=Toolkit.getDefaultToolkit().
                getScreenInsets(new JFrame().getGraphicsConfiguration());
        return new Rectangle(screenInsets.left,screenInsets.top,
                screenSize.width-screenInsets.left-screenInsets.right,
                screenSize.height-screenInsets.top-screenInsets.bottom);
    }
}
